import random
lottery_numbers=random.sample(range(1,34),8)
print("中奖号码为：",lottery_numbers)

user_input=input("输入你的8位号码：")
user_numbers=[int(num) for num in user_input.split()]

user_count=len(set(user_numbers)&set(lottery_numbers))
if user_count==8:
    print("恭喜获得一等奖")
elif user_count==7:
    print("恭喜获得二等奖")
elif user_count==6:
    print("恭喜获得三等奖")
elif user_count==5:
    print("恭喜获得四等奖")
else:
    print("很遗憾没有获奖")
